import { fileURLToPath } from 'node:url'
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config'
import viteConfig from './vite.config'

export default mergeConfig(
  viteConfig,
  defineConfig({
    test: {
      environment: 'jsdom',
      exclude: [
        ...configDefaults.exclude,
        // 'e2e/**', // 项目暂时没有引入e2e配置所以这里先暂时注释
      ],
      root: fileURLToPath(new URL('./', import.meta.url)),
    },
  }),
)
